<div class="index">  
<div class="mall"> 
<!-- 全部返现商家 Start -->
<div class="menu templateNeedDelete">
<h2><SPAN class=exp>全部返现商家</SPAN></h2>
<ul>
  <?php foreach ($this->malltype as $entry):?>
  <li onmouseover="this.className='on';" onmouseout="this.className='';">
    <h3><em><?php echo $this->escape($entry->typename)?></em></h3>
	<p>
	<?php 
		$i=0;
		foreach ($this->malls as $mallt){
			if($mallt->CatId==$entry->typecode &&$i<2){
				echo "<a href=\"mall.php?id=".$mallt->Id."\">".$mallt->name."</a>&nbsp;&nbsp;";
				$i++;
			}
		}
	?>
	</p>
    <div class=menu_show onmouseover="this.parentNode.className='on';" onmouseout="this.parentNode.className='';">
      <CITE></CITE>
      <dl>
        <DT><STRONG><?php echo $this->escape($entry->typename)?>所有商家：</STRONG></DT>
        <?php 
		$i=0;
		foreach ($this->malls as $mall){
			if($mall->CatId==$entry->typecode&&$i<20){
				echo "<dd><a href=\"mall.php?id=".$mall->id."\" target=\"_blank\">".$mall->name."（最高返".$mall->fan."）</a></dd>";
				$i++;
			}
		}
		?>
        <div style="clear:both"></div>
      </dl>
    </div>
  </li>
  <?php endforeach;?>  
</ul>
</div>

	<!-- 全部返现商家 End -->	
	<?php if(TGOPEN==1){?>	
	<div class="frame post" style="height:519px">
		<h2><span>团购商品</span></h2>
		<ul style="width:197px; overflow:hidden;">
			<?php
			while($row = mysql_fetch_array($tuan_goods))
			
			{?>
				<li class="tbdpleft">
					<div onMouseOver="this.className='tbdplist2left'" onMouseOut="this.className='tbdplist1left'" class="tbdplist1left">
					<div style="float:left; height:70px; width:70px; margin-top:5px; margin-left:5px;"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row['nick'] ?>的店铺"><img src="<?=$row['image']?>" title="<?=$row['title']?>" style=" width:65px; height:65px"  /></a></div>
					<div style="float:left; margin-left:0px; height:70px; width:90px; line-height:20px; overflow:hidden; margin-top:3px;">
						<div style="width:120px; height:22px; line-height:22px; overflow:hidden; text-align:left"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink"><?=$row['name']?></A></div>
						<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink">最高返：<?=$row['fan']?></A></div>
						<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="nolink">团购价：<?=$row['price']?></A></div>
					</div>
					</div>
				</li>
			<?php }?>
				</ul>
			</div>
	        <?php }else{?>
	        <div class="frame service" style="clear:both">
		<h2>返现客服</h2>
		<p class="exp">返现过程遇到问题请联系</p>
		<p class="qq" style="height:45px;"><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?=QQ?>&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:15846121:46" alt="点击这里给我发消息" title="点击这里给我发消息"></a>
	            			<a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=<?=urlencode(MYUSERNICK)?>&site=cntaobao&s=1&charset=utf-8" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=<?=urlencode(MYUSERNICK)?>&site=cntaobao&s=1&charset=utf-8" alt="点击这里给我发消息" /></a></p>
	</div>
		<!-- 返现服务专线 End --
			>
	 		<!-- 广告位2 Start -->
		<div class="frame limit_time" style="border:0px;">
			<div id="ad2"><a href="http://www.taobao.com/go/chn/tbk_channel/celebrate.php?pid=mm_29993940_0_0&eventid=102225"><img  style="border:0px;" src="<?php echo $this->baseUrl('upload/400x200.jpg');?>" width="200"/></a></div>
		</div>
		<?php }?>
		<div class="frame faq">
			<h2><span>常见问题</span></h2>
			<ul><?php while ($row = mysql_fetch_array($rs_article)) {?>
				<li class="template_module template_copy"><a href="read<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="innerHTML&href"><?=$row['title']?></a></li>
				<?php }?>
			</ul>
		</div>
		<!-- 常见问题 End --> 
	</div>
	
	<!-- main content Start -->
	<div class="main">
		<!-- 幻灯片 Start -->
			<div class="container" id="idTransformView2">
			  <ul class="slider slider2" id="idSlider2">
              <?php
			  foreach($slides_url as $k=>$v){?>
				<li><a href="<?=$slides_url[$k]?>" target="_blank" title="<?=$slides_title[$k]?>"><img src="upload/<?=$slides_pic[$k]?>" alt="<?=$slides_title[$k]?>"/></a></li>
			  <?php }?>
              </ul>
			  <ul class="num" id="idNum2">
              <?php
			  foreach($slides_url as $k=>$v){?>
				<li><?=$k+1?></li>
			  <?php }?>
			  </ul>
			</div>
		<!-- 幻灯片 End -->

		<!-- 推荐商家 Start -->
		<div class="mall_commend"> 
			<h2><span>推荐商家</span></h2>
			<div class="mall_content">
				<ul class="content_item" id="top_malls">
					<?php while ($row = mysql_fetch_array($rs_mall)) {?>
					<li class="template_module">
                    <div onMouseOver="this.className='tbdplist4'" onMouseOut="this.className='tbdplist3'" class="tbdplist3">
						<p class="picture"><a href="mall<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank"><img src="upload/<?=$row['logo']?>" alt="<?=$row['name']?>" class="template_mod" width="113px" height="50px"></a></p>
						<p class="name template_mod" etype="mallid" mallid="10000">最高返<span><?=$row['fan']?></span></p></div>
					</li>
					<?php }?>
				</ul>
			</div>
			<p class="more_link template_module"><a href="malllist<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 推荐商家 End -->
 		<!-- 淘宝热卖 Start -->
		<div class="use_fanli"> 
			<h2><span>淘宝热卖</span></h2>
			<div class="mall_content">
				<ul>
				<?php for($i = 0; $i < count($ListHot); $i++) {
				$hottitle=str_replace("'","",$ListHot[$i]["title"]);
				$hottitle=strip_tags($hottitle);
				//简易模式还是详细模式选择不同的链接地址
				if(WEBTYPE=='0'){
					$gourl="href=\"list.php?iid=".$ListHot[$i]["num_iid"]."\" target=\"_blank\"";
				}else{
					$gourl="href=\"view".$url_head_iid.encode_url($ListHot[$i]["num_iid"]).$url_end."\" target=\"_blank\"";
				}
				?>
					<li style="width:119px; border:1px solid #ddd; margin-left:3px;" fanli="<?=ck_fxje($ListHot[$i]["commission"],$_SESSION['dduserlevel'])?>">
						<p class="picture"><a <?=$gourl?>><SCRIPT language=javascript>setPic('<?php echo base64_encode($ListHot[$i]["pic_url"]."_310x310.jpg")?>',100,100,'<?php echo $hottitle ?>');</SCRIPT></a></p>
						<p class="name"><a <?=$gourl?>>淘宝价:<span class="hot_goods_list_num">￥<b><?php echo $ListHot[$i]["price"]; ?></b></span> 元</a></p>
						<p><a <?=$gourl?>>可返现:<span class="hot_goods_list_num"><b><? echo ck_fxje($ListHot[$i]["commission"],$_SESSION['dduserlevel'])?></b></span> 元</a></p>					
					</li>
				<?php } ?>
				</ul>
			</div>
			<p class="more_link template_module"><a href="list<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 淘宝热卖 End -->

		<!-- 购物资讯 Start -->
		<div class="vip_sale"> 
			<h2><span class="exp">优惠促销</span></h2>
			<div class="mall_content">
				<ul class="content_item">
					<?php while ($row = mysql_fetch_array($pic_cuxiao)) {?>
					<li class="template_module">
						<p class="picture"><a href="cuxiao<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="href"><img src="<?=$row['pic']?>" alt="<?=$row['name']?>" class="artpic" etype="src"></a></p>
					</li>
					<?php }?>
				</ul>
				<ul class="content_text" style="">
                <?php while ($row = mysql_fetch_array($cuxiao)) {?>
					<li style="width:255px; overflow:hidden; line-height:20px; height:20px;"><div style="width:200px; height:20px; line-height:20px;"><a href="cuxiao<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="bluelink" etype="innerHTML&href">[<?=$row['mallname']?>] <?=$row['name']?></a></div>
					</li>
				<?php }?>
				</ul>
				<ul class="content_text templateNeedNull" id="content" style="display: none;"></ul>
 
			</div>
			<p class="more_link template_module"><a href="coupons<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 购物资讯 End -->
 		<!-- 积分兑换 Start -->
		<div class="use_jifen"> 
			<h2><span>积分兑换</span></h2>
			<div class="mall_content">
				<ul>
                <?php while ($row = mysql_fetch_array($duihuan)) {?>
                    <li style="width:119px; border:1px solid #ddd; margin-left:3px; height:125px; padding-top:10px"><a href="huangou<?=$url_head_id?><?=$row['id']?><?=$url_end?>"><img src="<?=$row['pic']?>" alt="<?=$row['name']?>" border="0" style="width:100px; height:100px" /></a></br>
                    <a href="huangou<?=$url_head_id?><?=$row['id']?><?=$url_end?>"><?=$row['name']?></a>					
					</li>
                <?php }?>
				</ul>
			</div>
			<p class="more_link template_module"><a href="huan<?=$end?>" target="_blank" class="template_mod" etype="href&innerHTML">查看全部>></a></p>
		</div>
		<!-- 积分兑换 End -->
 
	</div>
	<!-- main content End -->
 
	<!-- side content Start -->
	<div class="side">
		   
		<!-- 返现引导 Start -->
		<div class="study">
			<div class="dostudy"><?php if($_SESSION["duoduouser"]!=''){?><a href="user/center.php" class="template_mod" etype="innerHTML&href">欢迎回来：<?=$_SESSION["duoduouser"]?></a><?php }else {?><a href="user/register.php" target="_blank" class="template_mod" etype="innerHTML&href">马上注册<?=WEBNICK?>会员</a><?php }?></div>
		</div>
		<!-- 返现引导 End -->
 
		<!-- 返现公告 Start -->
		<div class="frame notice">
			<h2><span>返现公告</span></h2>
			<ul>
			<?php while ($row = mysql_fetch_array($rs_gg)) {?>
				<li><div style="line-height:20px; height:20px; width:180px; overflow:hidden"><a href="read<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="innerHTML&href"><?=$row['title']?></a></div></li>
			<?php }?>
			</ul>
		</div>
		<!-- 返现公告 End -->
 
		
		<!-- 淘宝店铺 Start -->
		<div class="frame post">
			<h2><span>淘宝店铺</span></h2>
			<ul style="width:225px; overflow:hidden">
				<?php
				while($row3 = mysql_fetch_array($rs_shop))
				
				{?>
					<li class="tbdp">
						<div onMouseOver="this.className='tbdplist2'" onMouseOut="this.className='tbdplist1'" class="tbdplist1">
						<div style="float:left; height:70px; width:70px; margin-top:5px; margin-left:5px;"><A href="shop<?=$url_head_nick?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺"><SCRIPT language=javascript>setPic('<?php echo base64_encode("http://logo.taobao.com/shop-logo".$row3['pic_path'])?>',65,65,'<?php echo $row3['title'] ?>');</SCRIPT></a></div>
						<div style="float:left; margin-left:0px; height:70px; width:120px; line-height:20px; overflow:hidden; margin-top:3px;">
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden; text-align:left"><A href="shop<?=$url_head_nick?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺">掌柜：<?=$row3['nick']?></A></div>
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="shop<?=$url_head_nick?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺"><?php if($row3["type"]=="B"){echo "<img src=\"template/".MOBAN."/images/shangcheng.png\" alt=\"商城卖家\"  align=\"middle\">"; }else {echo " <img src=\"images/level_".$row3["level"].".gif\" align=\"absmiddle\" />";} ?></A></div>
							<div style="width:120px; height:22px; line-height:22px; overflow:hidden;text-align:left"><A href="shop<?=$url_head_nick?><?php echo urlencode($row3['nick']) ?><?=$url_end?>" target="_blank" class="nolink" title="进入<?php echo $row3['nick'] ?>的店铺">所在地：<?=$row3['city']?></A></div>
						</div>
						</div>
					</li>
				<?php }?>
			</ul>
		</div>
		<!-- 淘宝店铺 End -->
 		<!-- 购物资讯 Start -->
		<div class="frame notice">
			<h2><span>购物资讯</span></h2>
			<ul>
			<?php while ($row = mysql_fetch_array($rs_new_article)) {?>
				<li><div style="line-height:20px; height:20px; width:180px; overflow:hidden"><a href="read<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank" class="template_mod" etype="innerHTML&href"><?=$row['title']?></a></div></li>
			<?php }?>
			</ul>
		</div>
		<!-- 购物资讯 End -->
 
	</div>
	<!-- side content End -->
</div>